//
//  SHLiveTypeSelectViewController.m
//  Netease
//
//  Created by 王方伟 on 2017/8/22.
//  Copyright © 2017年 wfw. All rights reserved.
//

#import "SHLiveTypeSelectViewController.h"
#import "SHAnchorPreviewController.h"
#import "NTESLiveManager.h"

@interface SHLiveTypeSelectViewController ()

@end

@implementation SHLiveTypeSelectViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
}

#pragma mark 视频直播
- (IBAction)onClickVideoLiveButton:(UIButton *)sender {
    [NTESLiveManager sharedLiveManager].type = NIMNetCallMediaTypeVideo;
    [NTESLiveManager sharedLiveManager].liveQuality = NTESLiveQualityHigh;
    SHDragView *dragView = (SHDragView *)[self.view drageView];
    if (dragView) {
        if (dragView.isBig) return;
        SHAnchorPreviewController *anchorPreVC = [[SHAnchorPreviewController alloc] init];
        [DCURLRouter presentViewController:anchorPreVC animated:YES completion:^{
            dragView.isBig = YES;
        }];
    }else{
        SHAnchorPreviewController *anchorPreVC = [[SHAnchorPreviewController alloc] init];
        [DCURLRouter presentViewController:anchorPreVC animated:YES completion:nil];
    }
    
}

#pragma mark 语音直播
- (IBAction)onClickAudioLiveButton:(UIButton *)sender {
    [NTESLiveManager sharedLiveManager].type = NIMNetCallMediaTypeAudio;
    [NTESLiveManager sharedLiveManager].liveQuality = NTESLiveQualityNormal;
}

@end
